// code by 邹佳乐

var sheng ="0"
var shi = "0"

$(function (){
    fun2();
})
if (typeof(sheng)=="undefined"){
    sheng = "0";
}
if (typeof(shi)=="undefined"){
    shi = "0";
}

function fun2(){
    $.ajax({
        type:"post",
        url:"/system/getareaList/"+sheng+"/"+shi,
        dataType:"json",
        success: function (r) {
            if (r != null) {
                var t = "<tr>" +
                    "         <th>序号</th>" +
                    "         <th>省编号</th>" +
                    "         <th>省名称</th>" +
                    "         <th>市编号</th>" +
                    "         <th>市名称</th>" +
                    "       </tr>";
                for (var i = 0; i < r.length; i++) {
                    t+="<tr><td>"+r[i].rownum+"</td>";
                    t+="<td>"+r[i].c_NUMBER+"</td>";
                    t+="<td>"+r[i].p_NAME+"</td>";
                    t+="<td>"+r[i].p_NUMBER+"</td>";
                    t+="<td>"+r[i].c_Name+"</td></tr>";
                }
                $(".tablelist").html(t);
            }
        }

    })
}


function fun1(){
    sheng = $(".sheng").val()
    sheng = sheng ==""?"0":sheng
    shi = $(".shi").val()
    shi = shi == ""?"0":shi
    fun2()
}

